<template>
  <div style="width: 300px;display: flex;justify-content: space-between;">
     <a href="#" @click="go($event,'/news')">新闻</a>
     <a href="#" @click="go($event,'/music')">音乐</a>
     <a href="#" @click="go($event,'/vedio')">视频</a>
  </div>
  <div>
    <router-view></router-view>
  </div>
</template>

<script lang='ts' setup>
import {useRouter} from 'vue-router'
const router=useRouter()
const go=(event:MouseEvent,path:string)=>{
  event.preventDefault()
  router.push(path)
}
</script>

<style lang='scss' scoped>
</style>